﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="Prototype._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" DataSourceID="bookListDb" AutoGenerateColumns="False"
            AllowSorting="True">
            <Columns>
                <asp:TemplateField HeaderText="Photo">
                    <ItemTemplate>
                        <asp:HyperLink ID="bb" runat="server" NavigateUrl='<%# Eval("ID","~/Details.aspx?ID={0}") %>' Width="200px" Height="200px">
                            <asp:Image ID="aa" runat="server" ImageUrl='<%# Eval("Picture") %>'  Width="200px" Height="200px"/></asp:HyperLink>
                    </ItemTemplate>
                    <ControlStyle Height="200px" Width="200px" />
                </asp:TemplateField>
                <asp:BoundField DataField="Bookname" HeaderText="Bookname" SortExpression="Bookname" />
                <asp:BoundField DataField="Series" HeaderText="Series" SortExpression="Series" />
                <asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author" />
                <asp:BoundField DataField="YearPublished" HeaderText="YearPublished" SortExpression="YearPublished" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="bookListDb" runat="server" ConnectionString="<%$ ConnectionStrings:booksConn %>"
            ProviderName="<%$ ConnectionStrings:booksConn.ProviderName %>" SelectCommand="SELECT [ID],[Bookname], [Author], [YearPublished], [Series], [Picture] FROM [books]">
        </asp:SqlDataSource>
    </p>
</asp:Content>
